home *** CD-ROM | disk | FTP | other *** search
/ Colorado Rockies 2000 / Colorado Rockies 2000 by US West.iso / mac / xtras / Beatnik Xtra Lite / Beatnik Behaviors LiteD7.cst / 00002_Script_Stop Groovoid Lite Behavior < prev    next >
Text File  |  1998-10-22  |  6KB  |  128 lines

  1. -- Stop Groovoid Lite, a Beatnik Behavior
  2. -- by Paul Sebastien, pauls@sirius.com, http://www.bitstream.net/psykosonik
  3.  
  4. -- The 'Pro' version of this behavior will feature such additions as control over fade in and fade out upon starting and stopping the Groovoid, access to several additional Groovoids in the 'Pro' soundbank, and more. For more info, go to http://www.headspace.com/
  5.  
  6.  
  7.  
  8.  
  9.  
  10. global groovoidPlayer
  11.  
  12.  
  13.  
  14.  
  15. property pWhichGroovoid
  16. property pWhichEvent
  17.  
  18.  
  19.  
  20. on getPropertyDescriptionList
  21.   
  22.   --  initialize the Beatnik Xtra instance
  23.   
  24.   --  instantiation script (below) is commented out, as it is not necessary to instantiate a new instance, since we are just stopping an existing one named 'beatnik'.
  25.   
  26.   
  27.   --  put "------------------------------"
  28.   --  if ilk(groovoidPlayer) = #instance then stop(groovoidPlayer)
  29.   --  set groovoidPlayer = VOID
  30.   --  set groovoidPlayer = new(xtra "beatnik",TRUE)
  31.   --  set bankFileName = the moviePath & "patches.hsb"
  32.   --  put "groovoidPlayer =" && groovoidPlayer
  33.   --  put "Bank =" && bankFileName
  34.   --  put "SetSampleLibrary(groovoidPlayer) = " & setsampleLibrary(groovoidPlayer, bankFileName)
  35.   --  put "SetReady(groovoidPlayer) = " & setReady(groovoidPlayer)
  36.   --  put "isReady(groovoidPlayer) = " & isReady(groovoidPlayer)
  37.   --  if not(isReady(groovoidPlayer)) then
  38.   --    alert "The Beatnik Xtra did not initialize, the Beatnik soundbank file 'patches.hsb' must be in the same folder as your current Director movie is in (or modify the path in the script). Also, make sure that the Xtra (BEATNIK.X32) is added to this movie."
  39.   --    exit
  40.   --  end if
  41.   --  --  finished initializing the Beatnik Xtra instance
  42.   --  
  43.   
  44.   
  45.   
  46.   
  47.   
  48.   
  49.   
  50.   
  51.   set d = [:]
  52.   
  53.   addProp d, #pWhichGroovoid, [#default: "UI-BeepClick1", #format: #string, #range: ["UI-BeepClick1", "UI-CarriageReturn", "UI-MouseOverDrone1", "UI-OpenOrClose1", "UI-OpenOrClose2", "UI-OpenOrClose3", "UI-SimpleClick1", "UI-SimpleClick2", "UI-SystemBeep", "UI-TeletypeBurst2", "UI-TypeOneKey", "UI-Choice1", "UI-Question", "UI-Chimes", "UI-FunnyBeep","UI-Click1","UI-Click2","UI-Click3","UI-Click4","UI-Click5","UI-Click6","UI-Click7","UI-Click8","UI-Click9","UI-Click10","UI-Click11","UI-Click12","UI-Click13","UI-Click14","UI-Click15","UI-Click16","UI-Click17","UI-Click18","UI-Load1","UI-MouseOver1","UI-MouseOver2", "Hits-BlastOff", "Hits-Kicker1", "Hits-Kicker2", "Hits-Kicker5", "Hits-LudwigVan", "Hits-Magic", "Hits-MysteryChime", "Hits-SportsOrganCharge", "Hits-ZoomAndHit", "Fanfare-Arrival", "Fanfare-Cascade", "Fanfare-CorpSting1", "Fanfare-Finished", "Fanfare-Horserace", "Fanfare-Mars", "Fanfare-Majesty", "Fanfare-Presenting", "Fanfare-Sports", "Background-Beeps", "Background-Clock", "Background-Dubby", "Background-Funky", "Background-Groove2", "Background-InfoPulse", "Background-Latin", "Fanfare-News", "Background-Piano", "Background-SimpleTyping", "Background-Smooth", "Background-StillWaiting", "Background-Teletype", "Misc-CashRegister", "Misc-ThruPhoneRing"], #comment: "Choose a Groovoid to play"]
  54.   addProp d, #pWhichEvent, [#default: "mouseDown", #format: #symbol, #range: [#mouseDown, #mouseUp, #mouseEnter, #mouseLeave, #mouseWithin,#enterFrame,#exitFrame], #comment: "Choose a trigger event:"]
  55.   
  56.   
  57.   return d
  58. end
  59.  
  60.  
  61.  
  62. on doIt me
  63.   global groovoidPlayer
  64.   stop(groovoidPlayer, pWhichGroovoid)
  65.   
  66.   
  67. end
  68.  
  69.  
  70.  
  71. on mouseDown me
  72.   if the pWhichEvent of me = #mouseDown then doIt me
  73.   
  74. end
  75.  
  76.  
  77. on mouseUp me
  78.   if the pWhichEvent of me = #mouseUp then doIt me
  79.   
  80.   
  81.   
  82. end
  83.  
  84.  
  85. on mouseEnter me
  86.   if the pWhichEvent of me = #mouseEnter then doIt me
  87.   
  88. end
  89.  
  90.  
  91. on mouseLeave me
  92.   if the pWhichEvent of me = #mouseLeave then doIt me
  93.   
  94. end
  95.  
  96. on mouseWithin me
  97.   if the pWhichEvent of me = #mouseWithin then doIt me
  98.   
  99. end
  100.  
  101. on enterFrame me
  102.   if the pWhichEvent of me = #enterFrame then doIt me
  103.   
  104. end
  105.  
  106. on exitFrame me
  107.   if the pWhichEvent of me = #exitFrame then doIt me
  108.   
  109. end
  110.  
  111. on stopMovie
  112.   global groovoidPlayer
  113.    stop(groovoidPlayer)
  114.   closeBeatnik(groovoidPlayer)
  115.   set groovoidPlayer=VOID
  116.  
  117. end stopMovie
  118.  
  119.  
  120.  
  121. on getBehaviorDescription
  122.   
  123.   
  124.   set description = "STOP GROOVOID LITE BEHAVIOR" && RETURN & "by Paul Sebastien pauls@sirius.com" && RETURN && RETURN & "This Beatnik Behavior allows you to stop the playback of currently playing Groovoids, RMF music and sound FX files that are conveniently built into the soundbank (patches.hsb) that accompanies the Beatnik Xtra Lite." && RETURN && RETURN & "PARAMETERS:" && RETURN && RETURN & "ò Choose a Groovoid to stop:" && RETURN & "...Lets you choose which Groovoid to stop." && RETURN && RETURN & "ò Choose a trigger event:" && RETURN & "...Lets you choose which Director event you want to stop the playback of the Groovoid." && RETURN && RETURN & "IMPORTANT:" && RETURN &&RETURN & "- This behavior requires that the Beatnik Xtra Lite is properly added to your Director project, and also, the Beatnik soundbank (patches.hsb) must be in the same directory as your Director project file, otherwise you should change the path to the soundbank in this behavior's script if the soundbank resides elsewhere." && RETURN && RETURN & "- If you want to use this behavior to stop multiple Groovoids simultaneously, you should modify the Beatnik instance name used in this behavior's script so it is different/unique for each instance. Currently, the instance name used is 'groovoidPlayer', so if using multiple Groovoids that need to be stopped at the same time, you can modify the name in the script to 'groovoidPlayer2' and so on, as needed, to create multiple separate Groovoid players." && RETURN &&RETURN & "For more information on instantiating the Beatnik Xtra Lite, refer to the documentation or other Beatnik Xtra sample movies." && RETURN && RETURN & "To upgrade to Beatnik Behaviors Pro, or for more information on Beatnik-related products and music files, visit the Headspace web site at:" && RETURN && RETURN & "http://www.headspace.com"
  125.   
  126.   return description
  127. end
  128.